package com.syx.product.api;

import com.syx.product.Model.ProductInfo;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


public interface ProductInterface {
    @RequestMapping("/{productId}")
    ProductInfo getProductInfo(@PathVariable("productId") Integer id);


    @RequestMapping("/p1")
    String p1(@RequestParam("id") Integer id);


    @RequestMapping("/p2")
    String p2(@RequestParam("id") Integer id,@RequestParam("name") String name);


    @RequestMapping("/p3")
    String p3(ProductInfo productInfo);


    @RequestMapping("/p4")
    String p4(@RequestBody ProductInfo productInfo);
}
